package cn.leida;

/**
 * @author lei
 * @create 2025-03-11 18:37
 */

import cn.leida.ruoyi.common.config.AppConfig;
import cn.leida.ruoyi.common.config.AppServerConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.io.File;

/**
 * 启动程序
 *
 * @author lei
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
//@ComponentScan(basePackages = "cn.leida")
@EnableScheduling // 定时任务
public class AdminLocalDevApplication {

    public static void main(String[] args) {
        // 创建数据库目录
        File dbDir = new File("./.data/h2db");
        if (!dbDir.exists()) {
            dbDir.mkdirs();
        }

        AppConfig.changeDB(true);
        AppConfig.showDoc(true);
        ConfigurableApplicationContext ctx = SpringApplication.run(AdminLocalDevApplication.class, args);

        System.out.println("============local===success=============");
        System.out.println("============local===success=============");
        System.out.println("============local===success=============");
        System.out.println("============访问vue打包到jar中的=============");
        System.out.println("http://localhost:8349/index.html");
        System.out.println("修改配置文件: SecurityConfig.class");

    }
}
